home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 7
/
Apprentice-Release7.iso
/
Environments
/
Small Eiffel 0.4.8
/
lib_std
/
std_input_output.e
< prev
next >
Wrap
Text File
|
1997-04-13
|
981b
|
53 lines
-- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C)
-- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
--
class STD_INPUT_OUTPUT
--
-- To have the usefule `io' of class ANY.
--
inherit
STD_INPUT
undefine make, connect_to, disconnect
end;
STD_OUTPUT
redefine make, connect_to, disconnect
end;
creation {ANY}
make
feature {ANY}
make is
do
mode := "rw";
input_stream := stdin;
output_stream := stdout;
end;
connect_to(new_path: STRING) is
do
mode := "rw";
path := new_path;
output_stream := fopen(path,mode);
input_stream := output_stream;
end;
disconnect is
local
err: INTEGER;
do
if input_stream /= stdin then
err := fclose(input_stream);
end;
if output_stream /= stdout then
err := fclose(output_stream);
end;
path := Void;
input_stream := stdin;
output_stream := stdout;
end;
end -- STD_INPUT_OUTPUT